package com.ruoyi.datastatistics.service;

import org.springframework.web.bind.annotation.RequestParam;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class ItemForpeopletypeUtil {
    public static Map<String,Object> getItem(@RequestParam("peoplename") String peoplename){
        Map<String,Object> itemMap = new HashMap<>();
        List<Map<String,Object>> childitemlist = new ArrayList<>();
        List<Map<String,Object>> adultitemlist = new ArrayList<>();
        List<Map<String,Object>> olditemlist = new ArrayList<>();
        Map<String,Object> childitem1 = new HashMap<>();
        childitem1.put("itemcode","shengaograde");
        childitem1.put("itemname","身高");
        Map<String,Object> childitem2 = new HashMap<>();
        childitem2.put("itemcode","tzzsgrade");
        childitem2.put("itemname","体重指数");
        Map<String,Object> childitem3 = new HashMap<>();
        childitem3.put("itemcode","woligrade");
        childitem3.put("itemname","握力");
        Map<String,Object> childitem4 = new HashMap<>();
        childitem4.put("itemcode","zwtqqgrade");
        childitem4.put("itemname","坐位体前屈");
        Map<String,Object> childitem5 = new HashMap<>();
        childitem5.put("itemcode","ldtygrade");
        childitem5.put("itemname","立定跳远");
        Map<String,Object> childitem6 = new HashMap<>();
        childitem6.put("itemcode","sjlxtgrade");
        childitem6.put("itemname","双脚连续跳");
        Map<String,Object> childitem7 = new HashMap<>();
        childitem7.put("itemcode","swmrzapgrade");
        childitem7.put("itemname","15米绕障碍跑");
        Map<String,Object> childitem8 = new HashMap<>();
        childitem8.put("itemcode","zphmgrade");
        childitem8.put("itemname","走平衡木");
        childitemlist.add(childitem1);childitemlist.add(childitem2);childitemlist.add(childitem3);childitemlist.add(childitem4);childitemlist.add(childitem5);childitemlist.add(childitem6);childitemlist.add(childitem7);childitemlist.add(childitem8);
        //itemMap.put("childitemlist",childitemlist);
        Map<String,Object> adultitem1 = new HashMap<>();
        adultitem1.put("itemcode","tzzsgrade");
        adultitem1.put("itemname","体重指数");
        Map<String,Object> adultitem2 = new HashMap<>();
        adultitem2.put("itemcode","tzlgrade");
        adultitem2.put("itemname","体脂率");
        Map<String,Object> adultitem3 = new HashMap<>();
        adultitem3.put("itemcode","fhlgrade");
        adultitem3.put("itemname","肺活量");
        Map<String,Object> adultitem4 = new HashMap<>();
        adultitem4.put("itemcode","glcgrade");
        adultitem4.put("itemname","功率车二级负荷试验");
        Map<String,Object> adultitem5 = new HashMap<>();
        adultitem5.put("itemcode","woligrade");
        adultitem5.put("itemname","握力");
        Map<String,Object> adultitem6 = new HashMap<>();
        adultitem6.put("itemcode","zongtiaograde");
        adultitem6.put("itemname","纵跳");
        Map<String,Object> adultitem7 = new HashMap<>();
        adultitem7.put("itemcode","fwcgrade");
        adultitem7.put("itemname","俯卧撑");
        Map<String,Object> adultitem8 = new HashMap<>();
        adultitem8.put("itemcode","gwcgrade");
        adultitem8.put("itemname","跪卧撑");
        Map<String,Object> adultitem9 = new HashMap<>();
        adultitem9.put("itemcode","yfzywqzgrade");
        adultitem9.put("itemname","1分钟仰卧起坐");
        Map<String,Object> adultitem10 = new HashMap<>();
        adultitem10.put("itemcode","zwtqqgrade");
        adultitem10.put("itemname","坐位体前屈");
        Map<String,Object> adultitem11 = new HashMap<>();
        adultitem11.put("itemcode","bydjzlgrade");
        adultitem11.put("itemname","闭眼单脚站");
        Map<String,Object> adultitem12 = new HashMap<>();
        adultitem12.put("itemcode","xzfysgrade");
        adultitem12.put("itemname","选择反应时");
        adultitemlist.add(adultitem1);adultitemlist.add(adultitem2);adultitemlist.add(adultitem3);adultitemlist.add(adultitem4);adultitemlist.add(adultitem5);adultitemlist.add(adultitem6);
        adultitemlist.add(adultitem7);adultitemlist.add(adultitem8);adultitemlist.add(adultitem9);adultitemlist.add(adultitem10);adultitemlist.add(adultitem11);adultitemlist.add(adultitem12);
        //itemMap.put("adultitemlist",adultitemlist);
        Map<String,Object> olditem1 = new HashMap<>();
        olditem1.put("itemcode","tzzsgrade");
        olditem1.put("itemname","体重指数");
        Map<String,Object> olditem2 = new HashMap<>();
        olditem2.put("itemcode","tzlgrade");
        olditem2.put("itemname","体脂率");
        Map<String,Object> olditem3 = new HashMap<>();
        olditem3.put("itemcode","fhlgrade");
        olditem3.put("itemname","肺活量");
        Map<String,Object> olditem4 = new HashMap<>();
        olditem4.put("itemcode","lfzydgttgrade");
        olditem4.put("itemname","两分钟原地高抬腿");
        Map<String,Object> olditem5 = new HashMap<>();
        olditem5.put("itemcode","woligrade");
        olditem5.put("itemname","握力");
        Map<String,Object> olditem6 = new HashMap<>();
        olditem6.put("itemcode","zwtqqgrade");
        olditem6.put("itemname","坐位体前屈");
        Map<String,Object> olditem7 = new HashMap<>();
        olditem7.put("itemcode","bydjzlgrade");
        olditem7.put("itemname","闭眼单脚站");
        Map<String,Object> olditem8 = new HashMap<>();
        olditem8.put("itemcode","xzfysgrade");
        olditem8.put("itemname","选择反应时");
        Map<String,Object> olditem9 = new HashMap<>();
        olditem9.put("itemcode","ssmzzgrade");
        olditem9.put("itemname","30秒坐站");
        olditemlist.add(olditem1);olditemlist.add(olditem2);olditemlist.add(olditem3);olditemlist.add(olditem4);olditemlist.add(olditem5);
        olditemlist.add(olditem6);olditemlist.add(olditem7);olditemlist.add(olditem8);olditemlist.add(olditem9);
        //itemMap.put("olditemlist",olditemlist);
        if (peoplename.equals("childitemlist")){
            itemMap.put("peopletypelist",childitemlist);
        } else if (peoplename.equals("adultitemlist")) {
            itemMap.put("peopletypelist",adultitemlist);
        } else if (peoplename.equals("olditemlist")) {
            itemMap.put("peopletypelist",olditemlist);
        }
        return itemMap;
    }
}
